#!/usr/local/bin/python
# -*- coding: utf-8 -*-
from django.contrib import admin
from models import *

class PunbbCategoryAdmin(admin.ModelAdmin):
    list_display = ('cat_name', 'disp_position')
admin.site.register(PunbbCategory, PunbbCategoryAdmin)


class PunbbConfigAdmin(admin.ModelAdmin):
    list_display = ('conf_name', 'conf_value')
admin.site.register(PunbbConfig, PunbbConfigAdmin)


class PunbbPostAdmin(admin.ModelAdmin):
    list_display = ('id', 'topic', 'poster', 'poster_id', 'posted_display', 'edited_display', 'edited_by')
    list_filter = ('topic',)
admin.site.register(PunbbPost, PunbbPostAdmin)


class PunbbForumAdmin(admin.ModelAdmin):
    list_display = ('forum_name', 'cat', 'forum_desc', 'redirect_url', 'num_topics', 'num_posts',)
    list_filter = ('cat',)
admin.site.register(PunbbForum, PunbbForumAdmin)


class PunbbTopicAdmin(admin.ModelAdmin):
    list_display = ('id', 'subject', 'poster', 'forum', 'num_views', 'num_replies', 'closed', 'sticky')
    list_filter = ('forum', 'closed', 'sticky')
admin.site.register(PunbbTopic, PunbbTopicAdmin)
